package com.eric.windows.event;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;

import com.eric.windows.R;

/**
 * <h3>Description</h3>
 * TODO
 * <h3>Author</h3> Eric
 * <h3>Date</h3> 2017/8/3 15:56
 * <h3>Copyright</h3> Copyright (c)2017 Shenzhen TLIT  Co., Ltd. Inc. All rights reserved.
 */
public class PlaneView extends View {

    public float currentX = 100;
    public float currentY = 100;
    private final Resources resources;
    Paint paint = new Paint();

    public PlaneView(Context context) {
        super(context);
        resources = context.getResources();
        setFocusable(true);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        paint.setColor(Color.RED);
        canvas.drawBitmap(BitmapFactory.decodeResource(resources,R.mipmap.ic_plane),100,100,paint);
    }

}
